package com.tj.collection.db.domain;

import com.tj.collection.db.entity.AdminChatterEntity;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable;

/**
 * 后台用户与chatter绑定关系
 */
@Data
@Builder
public class AdminChatterVo implements Serializable {

    private Long adminId;

    private String chatterCode;

    public static AdminChatterVo toVo(AdminChatterEntity entity) {
        if (entity == null) {
            return null;
        }
        return AdminChatterVo.builder().adminId(Long.valueOf(entity.getAdminId())).chatterCode(entity.getChatterCode()).build();
    }
}
